<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>复杂的过渡动画</title>
    <style>
      a {
        text-decoration: none;
        color: #000;
      }

      .button {
        width: 120px;
        height: 50px;
        font-size: 18px;
        display: inline-block;
        border: 1px solid #ff0;
        border-radius: 8px;
        background-color: #aaf;
        text-align: center;
        line-height: 50px;
        position: relative;
        z-index: 0;
        overflow: hidden;
      }

      .button::after {
        content: "";
        position: absolute;
        width: 120%;
        height: 300%;
        background-color: #fcf;
        border-radius: 50%;
        left: -10%;
        top: 60px;
        z-index: -1;
      }

      .button:hover::after {
        transition: top 0.5s;
        top: -100%;
      }

      .button::before {
        content: "";
        position: absolute;
        width: 120px;
        height: 50px;
        background-color: #fcf;
        left: 0;
        top: -50px;
        z-index: -2;
        transition: top 0.5s ease;
      }

      .button:hover::before {
        transition: top 0s ease 0.5s;
        top: 0;
      }
    </style>
  </head>
  <body>
    <a href="#" class="button">鼠标放上去</a>
  </body>
</html>
